package com.example.demo.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

/**
 * 权限表
 * @TableName role_permission
 */
public class RolePermission implements Serializable {


    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 权限内容
     */
    private String permissionComent;

    /**
     * 前端路径id
     */
    private Long fId;

    /**
     *
     */
    private Long roleId;

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    public Long getId() {
        return id;
    }

    /**
     * 主键
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 权限内容
     */
    public String getPermissionComent() {
        return permissionComent;
    }

    /**
     * 权限内容
     */
    public void setPermissionComent(String permissionComent) {
        this.permissionComent = permissionComent;
    }

    /**
     * 前端路径id
     */
    public Long getfId() {
        return fId;
    }

    /**
     * 前端路径id
     */
    public void setfId(Long fId) {
        this.fId = fId;
    }

    /**
     *
     */
    public Long getRoleId() {
        return roleId;
    }

    /**
     *
     */
    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        RolePermission other = (RolePermission) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
                && (this.getPermissionComent() == null ? other.getPermissionComent() == null : this.getPermissionComent().equals(other.getPermissionComent()))
                && (this.getfId() == null ? other.getfId() == null : this.getfId().equals(other.getfId()))
                && (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getPermissionComent() == null) ? 0 : getPermissionComent().hashCode());
        result = prime * result + ((getfId() == null) ? 0 : getfId().hashCode());
        result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", permissionComent=").append(permissionComent);
        sb.append(", fId=").append(fId);
        sb.append(", roleId=").append(roleId);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}